<template>
  <div class="home-banner">
    <!-- 轮播图组件,全局直接写 -->
  <XtxSlider :data='slidersData'/>
  </div>
</template>

<script>
// 引入定义轮播图的方法
import { useBanner } from '@/hock/page'
export default {
  name: 'HomeBanner',
  setup () {
    // 调用定义轮播图的方法,并解构赋值出来slidersData
    const { slidersData } = useBanner()

    return { slidersData }
  }
}
</script>

<style scoped lang='less'>
.home-banner {
  width: 1240px;
  height: 500px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 98;
}
</style>
